{layout name="layout/win" /}
   
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak={:config('site.configgroup')['baidu_ak']}"></script>
<link  href="/assets/libs/view-js/viewer.min.css" rel="stylesheet">
<script src="/assets/libs/view-js/viewer.min.js"></script>
<script>
    var form_lat={$row->lat|htmlentities};
    var form_lng={$row->lng|htmlentities};
    var building_id = {$row->id};
</script>
<style>
.nav-tabs li a{color:#3c8dbc}
.nav-tabs li.active{color:#555555}
</style>
<div>
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">基本信息</a></li>
            {volist name="buildingPictureType" id="vo"}
            <li role="presentation"><a href="#type_{$vo->id}" aria-controls="type_{$vo->id}" role="tab" data-toggle="tab">{$vo->type_name}</a></li>
            {/volist}
        </ul>
    
        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="home">
                <div class="row">
                    <div class="col col-sm-9 col-xs-12">
                        <table class="table">
                            <tr>
                                <th>楼盘名称</th><td>{$row->building_name|htmlentities}</td>
                                <td colspan="4">
                                    {volist name="labels" id="vo"}
                                        <span class="label label-default" style="color:{$vo.label_color};border:{$vo.label_color} 1px solid;background-color:#fff">{$vo->label_name}</span>
                                    {/volist}
                                </td>
                            </tr>
                            <tr>
                                <th>区域</th><td>{$row->area|htmlentities}</td>
                                <th>电话</th><td>{$row->contact_tel|htmlentities}</td>
                                <th>&nbsp;</th><td>&nbsp;</td>
                            </tr>
                            <tr>
                                <th>地址</th><td>{$row->address|htmlentities}</td>
                                <th>接待时间</th><td>{$row->work_begin} 至 {$row->work_end}</td>
                                <th>有效期</th><td>{$row->validate_begin} 至 {$row->validate_end}</td>
                            </tr>
                            <tr>
                                <th>最新开盘</th><td>{$row->last_sell|htmlentities}</td>
                                <th>交房</th><td>{$row->get_date|htmlentities}</td>
                                <th>产权</th><td>{$row->property_year|htmlentities}</td>
                            </tr>
                            <tr>
                                <th>容积率</th><td>{$row->volume_ratio|htmlentities}</td>
                                <th>物业费</th><td>{$row->property_fee|htmlentities}</td>
                                <th>绿化率</th><td>{$row->greening_rate|htmlentities}</td>
                            </tr>
                            <tr>
                                <th>车位</th><td>{$row->parking_spaces|htmlentities}</td>
                                <th>户数</th><td>{$row->house_quantity|htmlentities}</td>
                                <th>开发商</th><td>{$row->developer|htmlentities}</td>
                            </tr>
                            <tr>
                                <th>物业公司</th><td>{$row->property_company|htmlentities}</td>
                                <th>案场对接</th><td>{$row->scene_person|htmlentities}</td>
                                <th>案场对接电话</th><td>{$row->scene_person_tel|htmlentities}</td>
                            </tr>
                            <tr>
                                <th>均价</th><td>{$row->average_price|htmlentities}</td>
                                <th>报备政策</th><td>{$row->reporting_policy|htmlentities}</td>
                                <th>楼盘状态</th><td id="tdBuildingState">{$row->state|htmlentities}</td>
                            </tr>
                            <tr>
                                <th>楼盘介绍</th><td colspan="5">{$row->introduction|htmlspecialchars_decode}</td>
                            </tr>
                            <tr>
                                <th>在售房源介绍</th><td colspan="3">{$row->on_selling|htmlentities}</td>
                                <th colspan="2">封面图片</th>
                            </tr>
                            <tr>
                                <th colspan="4">楼盘跟进</th>
                                <td rowspan="2">
                                    <div id="divPicture">
                                        <img src="{$row->picture|htmlentities}" style="max-width:200px;max-height:100px;" />
                                    </div>
                                    <script>
                                    new Viewer(document.getElementById('divPicture'), {
                                        url: 'data-original'
                                    });
                                    </script>
                                </td>
                            </tr>
                            <tr><td colspan="4">
                                <ul id="ulFollow">
                                </ul>
                            </td></tr>
                        </table>
                    </div>
                    <div class="col col-sm-3 col-xs-12">
                        <div id="cop-map-container" style="height:410px;width:280px" class="margin"></div> 
                        <fieldset>
                            <legend>佣金政策</legend>
                            {volist name="buildingTypes" id="vo1" key="key"}
                                {if ($vo1.has)} 
                                <div class="row">
                                    <label class="col col-xs-3">{$vo1.type_name}: </label>
                                    <label class="col col-xs-5">{$vo1.commission_policy} </label>
                                    <label class="col col-xs-4">{$vo1.price} 万元</label>
                                </div>
                                {/if}
                            {/volist}
                        </fieldset>
                    </div>
                </div>
            </div>
       
            {volist name="buildingPictureType" id="vo"}
            <div role="tabpanel" class="tab-pane" id="type_{$vo->id}">
                <div class="row container" id="images-type-{$vo->id}">
                    <?php foreach($pictures['v_' . $vo->id] as $key=>$value){?>
                        <div class="col col-xs-4 thumb">
                            <div class="thumbnail">
                                <img src="{$value[0]}" class="img-rounded" alt="{$value[1]}"/>
                                <div class="caption text-center">
                                   <p> {$value[1]} </p>
                                </div>
                            </div>
                        </div>  
                    <?php } ?>
                </div>
            </div>
            <script>
            var viewer = new Viewer(document.getElementById('images-type-{$vo->id}'), {
                url: 'data-original'
            });
            </script>
            {/volist}
        </div>
    </div>

    {include file="common/script" /}